BTAction = BTTask:New()

local this = BTAction
this.taskType = BTTaskType.Action
this.isEnter = false

function this:New()
	local o = {}
	setmetatable(o, self)
	self.__index = self
	return o
end

function this:OnUpdate()
	local status
	if (not self.isEnter) then
		self.isEnter = true
		self:Enter()
	end
	if (self.isEnter) then
		status = self:Execute()
		if (status ~= BTTaskStatus.Running) then
			self:Exit()
			self.isEnter = false
		end
	end
	return status
end

function this:Enter()
	-- print("BTAction:Enter")
end

function this:Execute()
	-- print("BTAction:Execute")
	return BTTaskStatus.Success
end

function this:Exit()
	-- print("BTAction:Exit")
end